#pragma once
#include"HashTable.h"

namespace bai
{	
	template<class K,class V>
	class Unordered_map
	{
		struct MapKeyOfT
		{
			const K& operator()(const pair<K,V>&kv)
			{
				return kv.first;
			}
		};

	public:
		typedef typename hash_bucket::HashTable<K, pair<K, V>, MapKeyOfT>::Iterator iterator;
		iterator begin()
		{
			return _ht.begin();
		}
		iterator end()
		{
			return _ht.end();
		}

		bool insert(const pair<K,V>& kv)
		{
			return _ht.insert(kv);
		}
	private:
		hash_bucket::HashTable<K, pair<K,V>,MapKeyOfT> _ht;
	};

}